/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package cz.dusa.worklog.controller;

import cz.dusa.worklog.datalib.WorklogData;

/**
 * Use WorklogDataListener interface for listening on database changes
 * @author vdusa
 */
public interface WorklogDataListener<WD extends WorklogData> {
    /**
     * This method is invoked whenever a new object in the database is created
     * @param wd is the newly created object
     */
    public void afterCreate(WD wd);

    /**
     * This method is invoked whenever an object is changed in the database
     * @param wd is the changed object
     */
    public void afterUpdate(WD wd);

    /**
     * This method is invoked before the given object is deleted from the database
     * @param wd
     */
    public void beforeDelete(WD wd);
}
